$OpenBSD: patch-src_tcl_tclglob_c,v 1.2 2017/05/09 13:01:42 espie Exp $
Index: src/tcl/tclglob.c
--- src/tcl/tclglob.c.orig
+++ src/tcl/tclglob.c
@@ -364,9 +364,9 @@ DoGlob(interp, dir, rem)
 	if (l2 <= STATIC_SIZE) {
 	    newDir = static1;
 	} else {
-	    newDir = (char *) ckalloc((unsigned) l2);
+	    newDir = ckalloc((unsigned) l2);
 	}
-	sprintf(newDir, "%s%s%.*s", dir, separator, p-rem, rem);
+	sprintf(newDir, "%s%s%.*s", dir, separator, (int)(p-rem), rem);
 	result = DoGlob(interp, newDir, p+1);
 	if (newDir != static1) {
 	    ckfree(newDir);
